# if语句
from itertools import count

if 5 > 2:
    print("111111")
else:
    print("222222")

#a b c 三个数字比较大小
# 嵌套
a = 10
b = 20
c =30
if a>b:
    if a>c:
        print("a is greater than c ")
    else:
        print("b is greater than c ")
else:
        if b>c:
            print("b is greater than c ")
        else:
            print("c is greater than b")

# elif 多重if
if a>b and a>c:
    print("a is greater than all ")
elif b>a and b>c:
    print("b is greater than all ")
elif c>a and c>b:
    print(" c is greater than all ")


#3.2.2猜数字
correct =int(input("Enter a number: "))
guess = int(input("请输入您猜测的数字："))
count = 0
while True:
    if guess > correct:
        print("很遗憾，你猜大了")
        count += 1
        guess = int(input("请输入您猜测的数字："))
    elif guess < correct:
        print("很遗憾，你猜小了")
        count += 1
        guess = int(input("请输入您猜测的数字："))
    elif guess == correct:
        print("恭喜，猜数成功")
        count += 1

        break

print('猜%d次'%count)